package cn.zhuo.knowledge.util.hutool.crypto.digest;

import cn.hutool.crypto.digest.DigestUtil;

import java.util.Arrays;

/**
 * <p>SHA 256 加密算法测试
 *
 * @author z2huo
 */
public class SHATest {

    public static void main(String[] args) {
        String str = "123456";

        byte[] bytes = DigestUtil.sha256(str);
        String s = DigestUtil.sha256Hex(str);

        System.out.println(Arrays.toString(bytes));
        System.out.println(new String(bytes));
        System.out.println(s);
    }
}
